<?php
declare (strict_types = 1);
namespace app\user\model\teacher;

use app\common\model\BaseModel;
use app\common\model\Attach;
use think\model\concern\SoftDelete;

/**
 * 定义等级数据模型
 */
class TeacherLevel extends BaseModel
{
    use softDelete;
    /**
     * 表名
     * @var string
     */
    protected $name = 'teacher_level';

    /**
     * 定义表主键
     * @var string
     */
    protected $pk = 'id';

    /**
     * 获取图标事件
     * Author   Martinsun<syh@sunyonghong.com>
     * Date 2022-09-21
     */
    public function iconUrl()
    {
        return $this->belongsTo(Attach::class, 'icon')->bind(['icon_url'=>'fileurl']);
    }
}
